﻿namespace primeNumber
{
    internal class Program
    {
        static bool isPrime(int num)
        {
            if (num == 2) return true;
            for (int i = 2; i <= Math.Sqrt(num); i++)
            {
                if (num % i == 0) return false;
            }
            return true;
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Please enter a integer: ");

            int num  = Convert.ToInt32(Console.ReadLine());
            if (num >= 2)
            {
                Console.WriteLine("Prime factors: ");
                for (int i = 2; i <= num; i++)
                {
                    if (num % i == 0 && isPrime(i))
                    {
                        Console.Write(i + " ");
                    }
                }
            } 
            
        }

    }
}